{% extends "iFriends_base.html" %}

{% block title %} Teste {% endblock %}
{% block content %}
<table width=100%>
<tr bgcolor="aabbcc"><td colspan="3">
<font size="12" color="white">Personal Information </font> <a href="{% url iFriends.People.views.person_form pID=p.id %}">[Edit]</a>
</td></tr>
<tr valign="top"><td width=30% bgcolor="aaaaaa"><font color="white" size="5">
    <li>Name: {{p.name}}</li>
    <li>Birthday: {{p.birthday|date:"d/m/Y"}}</li>
    <li>Gender:
    	{% ifequal p.gender "M" %}
    		Bloke
    	{% else %}
    		Sheila
    	{% endifequal %}
    </li>
</font></td>
<td width=40% bgcolor="aa99aa"><font color="white" size="4">
   {% include "quote.html" %}
</font></td>
<td width=30%>
    <h3>Contact Info</h3>
    <li>Email: {{p.email}}</li>
    <li>Website: {{p.favoriteURL}}</li>
</td></tr>
<tr>
<td width="30%" bgcolor="556677" valign="top">
    <font color="white" size="4">
    {% with p.friends.all as f1 %}
	    <h3>
	       {{f1|length|yesno:"iFriend, No Friend"}}{{f1|length|pluralize}}
	    </h3>
	    {% for f in f1 %}
	    	<li>{{f.name}}</li>
	    {% endfor %}
    {% endwith %}
    </font>
</td>
<td width="70%" bgcolor="555555" colspan="2" valign="top">
    <font color="white" size="4">
    {% with p.blogs.all as b1 %}
    	<h3>
	       {{ b1|length|yesno:"Blog,No Blog"}}
	       Entr{{b1|length|pluralize:"y,ies"}}
	       {% if perms.People.can_blog %}
	       		{% ifequal user.id p.userID.id %}
	       			<a href="
					{% url iFriends.People.views.add_blog pID=p.id %}
			 		">[+]</a>
	       		{% endifequal %}
	       {% endif %}
	    </h3>
	    {% for b in b1 %}
	    	<li>{{b.title}}</li>
	    	<font size="2"> {{ b.date|date:"M d, Y g:ma" }}</font>
				    	
	    {% endfor %}
    {% endwith %}  
    </font>
</td>
</tr>


</table>

{% endblock %}
